package com.googlecode.horncomb.orm.ibatis;

import java.io.Serializable;
import java.util.Collection;
import java.util.List;

import org.springframework.dao.DataAccessException;

import com.googlecode.horncomb.bean.order.Order;
import com.googlecode.horncomb.bean.paged.PagedList;

@SuppressWarnings("unchecked")
public interface CommonSqlMapDao {

	public Object getById(Serializable id, Class entityType)
			throws DataAccessException;

	public void insert(Object entity) throws DataAccessException;

	public void update(Object entity) throws DataAccessException;

	public void save(Object entity) throws DataAccessException;

	public int queryCountByExample(Object example);

	public Collection queryByExample(Object example);

	public List queryByExample(Object example, Order order)
			throws DataAccessException;

	public PagedList queryByExample(Object example, Order order, int page,
			int pageSize);

}
